<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        function show() {
            try {
                fetch('http://localhost:8080/emp/hxx.do')
                    .then(res=>{
                        console.log(res)//返回一个promise对象
                    })

            }catch(e){
                console.log(e)
            }
        }
    </script>
</head>
<body>
    <button onclick="show()">点击</button>
</body>
</html>